package com.itheima.reggie.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.itheima.reggie.dto.SetmealDto;
import com.itheima.reggie.entity.Setmeal;
import org.apache.ibatis.annotations.Param;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Transactional
public interface SetmealService extends IService<Setmeal> {
    //新增套餐信息
    void saveWithDish(SetmealDto setmealDto);


    //删除套餐及其关联数据
    void deleteWithDish(List<Long> ids);

    //根据id查询套餐及其关联数据
    SetmealDto getByIdWithDish(Long id);

    //修改套餐信息及其关联数据
    void updateWithDish(SetmealDto setmealDto);

    Integer countSaleNum(@Param("id") Long id, @Param("beginTime") String beginTime, @Param("endTime") String endTime);

}
